<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="/style/css/ch-ui.admin.css">
    <link rel="stylesheet" href="/style/font/css/font-awesome.min.css">
</head>
<body>
<!--面包屑导航 开始-->
<div class="crumb_warp">
    <!--<i class="fa fa-bell"></i> 欢迎使用登陆网站后台，建站的首选工具。-->
    <i class="fa fa-home"></i> <a href="/">首页</a> &raquo; <a href="#">请假管理</a> &raquo; 请假列表
</div>
<!--面包屑导航 结束-->

<!--搜索结果页面 列表 开始-->
<form id="form" action="#" method="post">
    <div class="result_wrap">
        <div class="result_content">
            <table class="list_tab">
                <thead>
                <tr>
                    <th>姓名</th>
                    <th>职位</th>
                    <th>类型</th>
                    <th>理由</th>
                    <th>请假开始日期</th>
                    <th>请假结束日期</th>
                    <th>状态</th>
                </tr>
                </thead>

                <tbody th:if="${#lists.size(leaves) gt 0}">
                <th:block th:each="leave,index:${leaves}">
                    <tr>
                        <td th:text="${leave.name}"></td>
                        <td th:text="${leave.deptName}"></td>
                        <td th:text="${leave.type}"></td>
                        <td th:text="${leave.reason}"></td>
                        <td th:text="${leave.start}"></td>
                        <td th:text="${leave.end}"></td>
                        <th:block th:switch="${leave.state}">
                            <th th:case="0" th:text="不批准"></th>
                            <th th:case="1" th:text="批准"></th>
                            <th th:case="2" th:text="待处理"></th>
                        </th:block>

                        <th:block th:if="${leave.state == 2}">
                            <a th:href="@{'/admin/leave/pass/'+${leave.id}}">批准</a>
                            <a th:href="@{'/admin/leave/reject/'+${leave.id}}">不批准</a>
                        </th:block>
                    </tr>
                </th:block>
                </tbody>
            </table>
            <div class="page_nav">
                <div id="page" style="margin: 0 auto;text-align: center;width: 50%">
                </div>
            </div>
        </div>
    </div>
</form>
<!--搜索结果页面 列表 结束-->

<script type="text/javascript" src="/style/js/jquery.js"></script>
<script type="text/javascript" src="/style/js/ch-ui.admin.js"></script>
</body>
</html>